package api

import (
	"github.com/kataras/iris/v12"
	"github.com/kataras/iris/v12/core/router"
	"irisfarm/app/controllers"
	"irisfarm/app/middlewares"
)

func AuthRoutes(app router.Party) {
	app.Post("/login", func(ctx iris.Context) {
		controllers.NewUserController(ctx).Login()
	})

	app.Get("/logout", middlewares.JwtMiddlewareCheck, func(ctx iris.Context) {
		controllers.NewUserController(ctx).Logout()
	})
}
